<?php

namespace app\api\controller;

use app\common\controller\Api;
use think\Db;

/**
 * 首页接口
 */
class Index extends Api
{
    protected $noNeedLogin = ['*'];
    protected $noNeedRight = ['*'];

    /**
     * 首页
     *
     */
    public function index()
    {
        $username = input('post.');
        // var_dump($username['name']);die();
        $data = Db::name('admin')->where('username', $username['name'])->find();       
        $unameid = Db::name('auth_group_access')->where('uid', $data['id'])->find();
        return json_encode( $unameid,JSON_UNESCAPED_UNICODE);
        $this->success('请求成功');
    }
}
